'use client';

import { usePathname } from 'next/navigation';
import Header from '@/components/Header';
import Footer from '@/components/Footer'


export default function ClientLayoutWrapper({
  children,
}: {
  children: React.ReactNode;
}) {
  const pathname = usePathname();
  
  if (pathname?.includes('/pptedit/show')||pathname?.includes('/read')) {
    return (
      <>
        <main className="flex-grow">
          {children}
        </main>
      </>
    );
  }  
  if (pathname?.includes('/music')) {
    return (
      <>
      <Header />
        <main className="flex-grow">
          {children}
        </main>
      </>
    );
  }  

  return  (
    <>
        <Header />
        <main className="flex-grow">
            {children}
        </main>
        <Footer />
    </>
  );
}